export const findMatchItem = (items: any, path: string) => {
  for (const item of items) {
    if (item.key === path) return item;
    if (item.children) {
      const found: any = findMatchItem(item.children, path);
      if (found) return found;
    }
  }
  return null;
};
